home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / S-Sound and Music / (c)s2.d64 / musicbox dncer.c (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  6KB  |  148 lines

  1. 100 REM PROGRAMMED BY BOB YEWCHUK               MISSISSAUGA ONTARIO
  2. 120 REM AS OF JULY 10, 1983
  3. 140 REM MUSIC BOX DANCER--WRITTEN BY        FRANK MILLS
  4. 160 REM COPYRIGHT 1974/1979 PETER PIPER     MUSIC LTD.  ALL RIGHTS RESERVED
  5. 200 POKE53280,11:POKE53281,11:PRINTCHR$(8):PRINTCHR$(14):PRINTCHR$(5)
  6. 220 PRINT"[147][211]PEED:    1=[198]ASTEST"
  7. 225 PRINT"   300=[211]LOWEST":INPUTT
  8. 230 IFT=0THENT=140
  9. 240 PRINT"[147][205]USIC [194]OX [196]ANCER"
  10. 260 PRINT"BY [198]RANK [205]ILLS"
  11. 280 GOSUB10000
  12. 290 REM INITIALIZE VARIABLES
  13. 300 A1=54277:A2=54284:A3=54291:REM          ATTACK/DECAY
  14. 310 S1=54278:S2=54285:S3=54292:REM          SUSTAIN/RELEASE
  15. 320 W1=54276:W2=54283:W3=54290:REM          WAVWFORMS
  16. 330 H1=54273:H2=54280:H3=54287:REM          HIGH BYTE OF NOTE
  17. 340 L1=54272:L2=54279:L3=54286:REM          LOW BYTE OF NOTE
  18. 350 X1=54275:X2=54282:X3=54289:REM          HIGH NYBBLE OF PULSE WIDTH
  19. 360 Y1=54274:Y2=54281:Y3=54288:REM          LOW BYTE OF PULSE WIDTH
  20. 370 VC=54296:REM VOLUME CONTROL
  21. 400 REM START UP THE SYSTEM
  22. 410 POKEA1,74:POKEA2,74:POKEA3,74:POKES1,138:POKES2,168:POKES3,138
  23. 430 POKEW1,33:POKEW2,65:POKEW3,65
  24. 440 POKEX1,27:POKEX2,72:POKEX3,145:POKEY1,4:POKEY2,3:POKEY3,7
  25. 460 POKEVC,15
  26. 500 REM THE MAIN ROUTINE
  27. 510 FORG=1TO2
  28. 520 READA,B,C,D,E,F
  29. 530 IFG=2ANDA=0ANDC=0ANDE=0THEN880
  30. 540 IFA=999THEN620
  31. 560 POKEH1,A:POKEL1,B:POKEH2,C:POKEL2,D:POKEH3,E:POKEL3,F
  32. 580 FORW=1TOT:NEXT
  33. 600 GOTO520
  34. 620 RESTORE:NEXT
  35. 880 FORQ=1TO(8*T):NEXT
  36. 900 GOSUB10000:PRINTCHR$(9):END
  37. 990 REM DATA STARTS HERE
  38. 1010 DATA16,195,0,0,0,0,21,31,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0
  39. 1020 DATA33,135,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0,25,30,0,0,0,0:REM BAR 1
  40. 1030 DATA16,195,0,0,0,0,21,31,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0
  41. 1040 DATA33,135,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0,25,30,0,0,0,0:REM BAR 2
  42. 1050 DATA16,195,0,0,0,0,21,31,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0
  43. 1060 DATA33,135,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0,25,30,0,0,0,0:REM BAR 3
  44. 1070 DATA16,195,0,0,0,0,21,31,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0
  45. 1080 DATA33,135,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0,25,30,33,135,0,0:REM BAR 4
  46. 1090 DATA 16,195,33,135,0,0,21,31,25,30,0,0
  47. 1100 DATA 25,30,33,135,0,0,33,135,42,62,0,0
  48. 1110 DATA 21,31,33,135,0,0,25,30,42,62,0,0
  49. 1120 DATA33,135,50,60,0,0,25,30,33,135,0,0:REM BAR 5
  50. 1130 DATA22,96,67,15,0,0,28,49,63,75,0,0
  51. 1140 DATA33,135,56,99,0,0,44,193,50,60,0,0
  52. 1150 DATA16,195,50,60,0,0,21,31,50,60,0,0
  53. 1160 DATA25,30,0,0,0,0,33,135,0,0,0,0:REM BAR 6
  54. 1170 DATA12,143,50,60,0,0,15,210,44,193,0,0
  55. 1180 DATA18,209,37,162,0,0,25,30,31,165,0,0
  56. 1190 DATA15,210,25,30,0,0,18,209,31,165,0,0
  57. 1200 DATA25,30,37,162,0,0,18,209,44,193,0,0:REM BAR 7
  58. 1210 DATA16,193,42,62,0,0,21,31,33,135,0,0
  59. 1220 DATA33,135,56,99,0,0,25,30,50,60,0,0
  60. 1230 DATA21,31,50,60,0,0,25,30,50,60,0,0
  61. 1240 DATA33,135,0,0,0,0,25,30,33,135,0,0:REM BAR 8
  62. 1250 DATA 16,195,33,135,0,0,21,31,25,30,0,0
  63. 1260 DATA 25,30,33,135,0,0,33,135,42,62,0,0
  64. 1270 DATA 21,31,33,135,0,0,25,30,42,62,0,0
  65. 1280 DATA33,135,50,60,0,0,25,30,33,135,0,0:REM BAR 9
  66. 1290 DATA22,96,67,15,0,0,28,49,63,75,0,0
  67. 1300 DATA33,135,56,99,0,0,44,193,50,60,0,0
  68. 1310 DATA16,195,50,60,0,0,21,31,50,60,0,0
  69. 1320 DATA25,30,0,0,0,0,33,135,0,0,0,0:REM BAR 10
  70. 1330 DATA12,143,50,60,0,0,15,210,44,193,0,0
  71. 1340 DATA18,209,37,162,0,0,25,30,31,165,0,0
  72. 1350 DATA15,210,25,30,0,0,18,209,31,165,0,0
  73. 1360 DATA25,30,37,162,0,0,18,209,31,165,0,0:REM BAR 11
  74. 1370 DATA16,195,33,135,0,0,21,31,25,30,0,0
  75. 1380 DATA25,30,42,62,0,0,33,135,33,135,0,0
  76. 1390 DATA21,31,33,135,0,0,25,30,33,135,0,0
  77. 1400 DATA33,135,0,0,0,0,12,143,33,135,0,0:REM BAR 12
  78. 1410 DATA0,0,33,135,4,48,12,143,25,30,4,48
  79. 1420 DATA16,195,33,135,4,48,21,31,42,62,4,48
  80. 1430 DATA12,143,33,135,4,48,12,143,42,62,4,48
  81. 1440 DATA16,195,50,60,4,48,8,97,33,135,4,48:REM PART 2 -- BAR 1
  82. 1460 DATA0,0,5,152,67,15,11,48,63,75,5,152
  83. 1470 DATA14,24,56,99,5,152,12,143,50,60,5,152
  84. 1480 DATA8,97,50,60,0,0,12,143,50,60,0,0
  85. 1490 DATA16,195,21,31,0,0,9,104,12,143,0,0:REM PART 2 -- BAR 2
  86. 1500 DATA0,0,100,121,6,71,12,143,89,131,6,71
  87. 1510 DATA18,209,75,69,6,71,22,96,63,75,6,71
  88. 1520 DATA12,143,50,60,6,71,12,143,63,75,6,71
  89. 1530 DATA22,96,75,69,6,71,12,143,89,131,6,71:REM PART 2 -- BAR 3
  90. 1540 DATA0,0,84,125,4,48,12,143,67,15,4,48
  91. 1550 DATA16,195,112,199,4,48,21,31,100,121,4,48
  92. 1560 DATA12,143,100,121,4,48,12,143,100,121,4,48
  93. 1570 DATA16,195,21,31,4,48,12,143,33,135,4,48:REM PART 2 -- BAR 4
  94. 1580 DATA0,0,33,135,4,48,12,143,25,30,4,48
  95. 1590 DATA16,195,33,135,4,48,21,31,42,62,4,48
  96. 1600 DATA12,143,33,135,4,48,12,143,42,62,4,48
  97. 1610 DATA16,195,50,60,4,48,8,97,33,135,4,48:REM PART 2 -- BAR 5
  98. 1620 DATA0,0,5,152,67,15,11,48,63,75,5,152
  99. 1630 DATA14,24,56,99,5,152,12,143,50,60,5,152
  100. 1640 DATA8,97,50,60,0,0,12,143,50,60,0,0
  101. 1650 DATA16,195,21,31,0,0,9,104,12,143,0,0:REM PART 2 -- BAR 6
  102. 1660 DATA0,0,100,121,6,71,12,143,89,131,6,71
  103. 1670 DATA18,209,75,69,6,71,22,96,63,75,6,71
  104. 1680 DATA12,143,50,60,6,71,12,143,63,75,6,71
  105. 1690 DATA22,96,75,69,6,71,12,143,63,75,6,71:REM PART 2 -- BAR 7
  106. 1700 DATA0,0,67,15,4,48,12,143,50,60,4,48
  107. 1710 DATA16,195,84,125,4,48,21,31,67,15,4,48
  108. 1720 DATA12,143,67,15,4,48,12,143,67,15,4,48
  109. 1730 DATA16,195,67,15,4,48,12,143,67,15,4,48:REM PART 2 -- BAR 8
  110. 1740 DATA89,131,134,30,5,152,11,48,112,199,5,152
  111. 1750 DATA16,195,89,131,5,152,22,96,67,15,5,152
  112. 1760 DATA11,48,56,99,5,152,11,48,67,15,5,152
  113. 1770 DATA14,24,89,131,5,152,12,143,112,199,5,152:REM PART 2 -- BAR 9
  114. 1780 DATA0,0,100,121,4,48,12,141,67,75,4,48
  115. 1790 DATA16,195,112,199,4,48,21,31,100,121,4,48
  116. 1800 DATA12,143,100,121,4,48,12,143,100,121,4,48
  117. 1810 DATA16,195,21,31,4,48,9,104,12,143,4,48:REM PART 2 -- BAR 10
  118. 1820 DATA63,75,100,121,6,71,12,143,89,131,6,71
  119. 1830 DATA18,209,75,69,6,71,22,96,63,75,6,71
  120. 1840 DATA12,143,50,60,6,71,15,210,63,75,6,71
  121. 1850 DATA18,209,75,69,6,71,12,143,89,131,6,71:REM PART 2 -- BAR 11
  122. 1860 DATA0,0,84,125,4,48,16,195,67,15,4,48
  123. 1870 DATA21,31,112,199,4,48,33,135,100,121,4,48
  124. 1880 DATA16,195,100,121,4,48,16,195,67,15,4,48
  125. 1890 DATA25,30,84,125,4,48,11,48,100,121,4,48:REM PART 2 -- BAR 12
  126. 1900 DATA89,131,134,30,5,152,11,48,112,199,5,152
  127. 1910 DATA16,195,89,131,5,152,22,96,67,15,5,152
  128. 1920 DATA11,48,56,99,5,152,11,48,67,15,5,152
  129. 1930 DATA14,24,89,131,5,152,12,143,112,199,5,152:REM PART 2 -- BAR 13
  130. 1940 DATA0,0,100,121,4,48,12,141,67,75,4,48
  131. 1950 DATA16,195,112,199,4,48,21,31,100,121,4,48
  132. 1960 DATA12,143,100,121,4,48,12,143,67,15,4,48
  133. 1970 DATA16,195,67,15,4,48,12,143,67,15,4,48:REM PART 2 -- BAR 14
  134. 1980 DATA63,75,100,121,6,71,12,143,89,131,6,71
  135. 1990 DATA18,209,75,69,6,71,22,96,63,75,6,71
  136. 2000 DATA12,143,50,60,6,71,15,210,63,75,6,71
  137. 2010 DATA18,209,75,69,6,71,12,143,63,75,6,71:REM PART 2 -- BAR 15
  138. 2020 DATA0,0,67,15,4,48,12,143,50,60,4,48
  139. 2030 DATA16,195,84,125,4,48,12,143,67,15,4,48.
  140. 2040 DATA16,195,67,15,4,48,16,195,67,15,4,48
  141. 2050 DATA0,0,0,0,0,0,0,0,0,0,0,0:REM PART 2 -- BAR 16
  142. 9970 DATA999,999,999,999,999,999
  143. 9980 GOSUB10000
  144. 9990 END
  145. 10000 REM CLEAR SOUND LOCATIONS
  146. 10020 FORQ=54270TO54300:POKEQ,0:NEXT
  147. 10040 RETURN
  148.